package com.srh.stockmanager.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.srh.stockmanager.dao.UserDAO;
import com.srh.stockmanager.entity.User;

/**
 * 
 * @author Sebastian R Helguera (srhelguera@hotmail.com)
 * @version 01/04/2012
 */
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDAO userDAO;
	
	@Transactional
	public void addUser(User user) {
		userDAO.addUser(user);
	}

	@Transactional
	public List<User> listUser() {

		return userDAO.listUser();
	}

	@Transactional
	public void removeUser(Long id) {
		userDAO.removeUser(id);
	}
}
